/**
 * @author zhengjiachao
 * @since 2017-3-27
 */
ADF.model.LabelModel = function(){
    ADF.model.LabelModel.superclass.constructor.call(this);
};

ADF.model.LabelModel.PROPERTY_TEXT="text";

COM.util.defineClass(ADF.model.LabelModel, ADF.model.BaseModel,{

    initModel:function () {
        ADF.model.LabelModel.superclass.initModel.call(this);
        this.addPropertyDescriptor(new ADF.propertyDescriptor.DefaultPropertyDescriptor(ADF.model.LabelModel.PROPERTY_TEXT, "", "", true, "文本"));
    },
    setText:function(text){
        this.setPropertyValue(ADF.model.LabelModel.PROPERTY_TEXT, text);
    },
    getText:function(){
        return this.getPropertyValue(ADF.model.LabelModel.PROPERTY_TEXT);
    },
    _getModelType : function(){
        return "ADF.model.LabelModel";
    },

    _getName : function(){
        return 'label';  
    },

    fillSerializedJson : function(jsonObject){
        jsonObject[ADF.model.LabelModel.PROPERTY_TEXT]=this.getPropertyDescriptor(ADF.model.LabelModel.PROPERTY_TEXT).serialize();
    },

    _deserialize:function (jsonObject) {
        var newProp=null;

        newProp=new AGEF.PropertyDescriptor();
        newProp.deserialize(jsonObject[ADF.model.LabelModel.PROPERTY_TEXT]);
        this.propertyDescriptors.put(newProp.getName(),newProp);
    }
});